import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class day230424 {
    // 美国节日

    // 判断闰年
    private static boolean isLeapYear(int y) {
        return (y % 4 == 0 && y % 100 != 0) || (y % 400 == 0);
    }

    // 给定 y, m, d, 判断这一年过了几天
    private static int d1(int y, int m, int d) {
        int[] days = {0 , 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30};
        int day = d;
        for (int i = 0; i < m; i++) {
            day += days[i];
        }

        // 3 月开始, 要计算闰年
        if (m > 2 && isLeapYear(y)) {
            day++;
        }
        return day;
    }

    // 给定 y, 求[1, y - 1], 有多少个闰年
    private static int leapYearCount(int y) {
        return (y - 1) / 4 - (y - 1) / 100 + (y - 1) / 400;
    }

    // 给定y, m, d, 求与基准值0000-12-31, 过了多少天
    private static int day(int y, int m, int d) {
        return y - 1 + leapYearCount(y) + d1(y, m, d);
    }

    // 给定y, m, d, 求周几
    private static int week(int y, int m, int d) {
        int w = day(y, m, d) % 7;
        if (w == 0) {
            return 7;
        }
        return w;
    }

    // 已知 1 号 是周 w, 求第 n 个周 e, 是几号
    private static int date1(int w, int n, int e) {
        return 1 + (n - 1) * 7 + (7 - w + e) % 7;
    }

    // 已知6月1号是周w, 求5月的最后一个周一, 是几号
    private static int date2(int w) {
        return 31 - (w == 1 ? 6 : w - 2);
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextInt()) {
            int y = sc.nextInt();
            System.out.printf("%d-01-01\n", y);

            System.out.printf("%d-01-%02d\n",
                    y, date1(week(y, 1, 1), 3, 1));

            System.out.printf("%d-02-%02d\n",
                    y, date1(week(y, 2, 1), 3, 1));

            System.out.printf("%d-05-%02d\n",
                    y, date2(week(y, 6, 1)));

            System.out.printf("%d-07-04\n", y);

            System.out.printf("%d-09-%02d\n",
                    y, date1(week(y, 9, 1), 1, 1));

            System.out.printf("%d-11-%02d\n",
                    y, date1(week(y, 11, 1), 4, 4));

            System.out.printf("%d-12-25\n\n", y);
        }
    }

    // 分解因数
    public static void main2(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextInt()) {
            int n = sc.nextInt();
            StringBuilder sb = new StringBuilder();
            sb.append(n);
            sb.append(" = ");
            for (int i = 2; n > 1 && i * i <= n; i++) {
                while (n % i == 0) {
                    // 找到一个因子
                    if (Character.isDigit(sb.charAt(sb.length() - 1))) {
                        sb.append(" * ");
                    }
                    sb.append(i);
                    n /= i;
                }
            }
            if (n != 1) {
                if (Character.isDigit(sb.charAt(sb.length() - 1))) {
                    sb.append(" * ");
                }
                sb.append(n);
            }
            System.out.println(sb);
        }
    }

    public static void main3(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextInt()) {
            int n = sc.nextInt();
            int tmp = n;
            List<String> list = new ArrayList<>();
            for (int i = 2; n > 1 && i * i <= n; i++) {
                while (n % i == 0) {
                    // 找到一个因子
                    list.add(String.valueOf(i));
                    n /= i;
                }
            }
            if (n != 1) {
                list.add(String.valueOf(n));
            }
            System.out.printf("%d = %s\n", tmp, String.join(" * ", list));
        }
    }
}
